﻿<UserControl x:Class="Conference.UX.WinPhone.Pages.SpeakerListEntityPart"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:tcl="clr-namespace:TeaLightV5.Foundation.UX.WinPhone.Controls;assembly=TeaLightV5.Foundation.Ux.WinPhone"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">

    <Grid x:Name="ContentPanel" Grid.Row="1">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <ListBox Grid.Row="1" Grid.Column="0" ItemsSource="{Binding Data}" HorizontalContentAlignment="Stretch" >
            <ListBox.ItemTemplate>
                <DataTemplate >
                    <tcl:StackPanel TapCommand="{Binding ReadCommand}" >
                        <tcl:StackPanel DataContext="{Binding Data}" >
                            <TextBlock Text="{Binding Name, Mode=TwoWay}" />
                            <TextBlock Text="{Binding Title}" TextWrapping="Wrap"/>
                        </tcl:StackPanel>
                    </tcl:StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <StackPanel Orientation="Horizontal" Grid.Row="1" >
            <Button Command="{Binding AddCommand}">Add</Button>
            <Button Command="{Binding RefreshCommand}">Refresh</Button>
        </StackPanel>
    </Grid>
</UserControl>